package com.hnust.service.impl;

import com.hnust.dao.PaperCorrectDao;
import com.hnust.domain.Questions;
import com.hnust.domain.TestMessage;
import com.hnust.service.PaperCorrectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PaperCorrectServiceImpl implements PaperCorrectService {
    @Autowired
    PaperCorrectDao paperCorrectDao;

    //获取考试信息
    @Override
    public List<TestMessage> getTest(String paperId) {
//        System.out.println(" paperCorrectDao.getTest(paperId)"+ paperCorrectDao.getTest(paperId));
        return paperCorrectDao.getTest(paperId);
    }

    //获取选择题
    @Override
    public List<Questions> getChoiceQuestions(String paperId){
        return paperCorrectDao.getChoiceQuestions(paperId);
    }

    //获取判断题
    @Override
    public List<Questions> getJudgeQuestions(String paperId){
        return paperCorrectDao.getJudgeQuestions(paperId);
    }

    //获取填空题
    @Override
    public List<Questions> getGapQuestions(String paperId){
        return paperCorrectDao.getGapQuestions(paperId);
    }

    //获取简答题
    @Override
    public List<Questions> getEssayQuestions(String paperId){
        return paperCorrectDao.getEssayQuestions(paperId);
    }
}
